//
//  UIImageView+Chained.m
//  ObjectCChained
//
//  Created by sny on 2018/5/18.
//  Copyright © 2018年 HuangYangYang. All rights reserved.
//

#import "UIImageView+Chained.h"

@implementation UIImageView (Chained)

- (UIImageView *(^)(UIImage *,UIViewContentMode ))chainedImageViewContentSet {
    return ^UIImageView *(UIImage *image,UIViewContentMode contentModel) {
        if (image) {self.image = image;}
        if (contentModel) {self.contentMode = contentModel;}
        return self;
    };
}

- (UIImageView *(^)(NSArray *,NSArray *,NSTimeInterval))chainedUIImageViewAnimationImages {
    return ^UIImageView *(NSArray *highlightedAnimationImages,NSArray *animationImages,NSTimeInterval animationDuration) {
        if (highlightedAnimationImages) {self.highlightedAnimationImages = highlightedAnimationImages;}
        if (animationImages) {self.animationImages = animationImages;}
        self.animationDuration = animationDuration;
        return self;
    };
}

- (UIImageView *(^)(BOOL))chainedUIImageViewHighlighted {
    return ^UIImageView *(BOOL highlighted) {
        self.highlighted = highlighted;
        return self;
    };
}

- (UIImageView *(^)(NSInteger))chainedUIImageViewAnimationRepeatCount {
    return ^UIImageView *(NSInteger animationRepeatCount) {
        self.animationRepeatCount = animationRepeatCount;
        return self;
    };
}


#pragma mark - setter
- (void)setChainedImageViewContentSet:(UIImageView *(^)(UIImage *, UIViewContentMode))chainedImageViewContentSet {}

- (void)setChainedUIImageViewHighlighted:(UIImageView *(^)(BOOL))chainedUIImageViewHighlighted {}

- (void)setChainedUIImageViewAnimationImages:(UIImageView *(^)(NSArray *, NSArray *, NSTimeInterval))chainedUIImageViewAnimationImages {}

- (void)setChainedUIImageViewAnimationRepeatCount:(UIImageView *(^)(NSInteger))chainedUIImageViewAnimationRepeatCount {}

@end
